using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using Bussiness.Config;     
using Bussiness.Entity;
namespace Bussiness.ManagerBase
{
                

     public abstract class PT_OILManagerBase
    {
        public PT_OILManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity Insert(PT_OILEntity obj)
        { 
            return (PT_OILEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity Update(PT_OILEntity obj)
        { 
            return (PT_OILEntity)Adapter.Update(obj);             
        }
 
 
        public PT_OILEntity Delete(PT_OILEntity obj)
        { 
            return (PT_OILEntity)Adapter.Delete(obj);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Code duoc set trong object
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByCode (PT_OILEntity obj)
        { 
            return (PT_OILEntity)Adapter.DeleteByField(obj,"Code");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Code 
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByCode (string Code )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.Code = Code;  
            return (PT_OILEntity)Adapter.DeleteByField(obj,"Code");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByCreatedBy (PT_OILEntity obj)
        { 
            return (PT_OILEntity)Adapter.DeleteByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedBy 
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByCreatedBy (string CreatedBy )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.CreatedBy = CreatedBy;  
            return (PT_OILEntity)Adapter.DeleteByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByCreatedDate (PT_OILEntity obj)
        { 
            return (PT_OILEntity)Adapter.DeleteByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedDate 
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByCreatedDate (DateTime CreatedDate )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.CreatedDate = CreatedDate;  
            return (PT_OILEntity)Adapter.DeleteByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ID duoc set trong object
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByID (PT_OILEntity obj)
        { 
            return (PT_OILEntity)Adapter.DeleteByField(obj,"ID");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ID 
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByID (int ID )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.ID = ID;  
            return (PT_OILEntity)Adapter.DeleteByField(obj,"ID");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByIsActive (PT_OILEntity obj)
        { 
            return (PT_OILEntity)Adapter.DeleteByField(obj,"IsActive");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IsActive 
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByIsActive (bool IsActive )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.IsActive = IsActive;  
            return (PT_OILEntity)Adapter.DeleteByField(obj,"IsActive");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByIsDeleted (PT_OILEntity obj)
        { 
            return (PT_OILEntity)Adapter.DeleteByField(obj,"IsDeleted");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IsDeleted 
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByIsDeleted (bool IsDeleted )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.IsDeleted = IsDeleted;  
            return (PT_OILEntity)Adapter.DeleteByField(obj,"IsDeleted");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByUpdatedBy (PT_OILEntity obj)
        { 
            return (PT_OILEntity)Adapter.DeleteByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedBy 
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByUpdatedBy (string UpdatedBy )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.UpdatedBy = UpdatedBy;  
            return (PT_OILEntity)Adapter.DeleteByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByUpdatedDate (PT_OILEntity obj)
        { 
            return (PT_OILEntity)Adapter.DeleteByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedDate 
        /// </summary>
        /// <returns>PT_OILEntity</returns>
        public PT_OILEntity DeleteByUpdatedDate (DateTime UpdatedDate )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.UpdatedDate = UpdatedDate;  
            return (PT_OILEntity)Adapter.DeleteByField(obj,"UpdatedDate");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public PT_OILEntity Select(PT_OILEntity obj)
        { 
            return (PT_OILEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(PT_OILEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(PT_OILEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new PT_OILEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new PT_OILEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<PT_OILEntity> SelectAllLST()
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new PT_OILEntity()),new PT_OILEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<PT_OILEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new PT_OILEntity(),option),new PT_OILEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien Code duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCode (PT_OILEntity obj)
        { 
            return Adapter.SelectByField(obj,"Code");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Code duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCode (PT_OILEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Code",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Code duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByCodeLST (PT_OILEntity obj)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Code"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Code duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByCodeLST (PT_OILEntity obj,SelectOptions option)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Code",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Code 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCode (string Code )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.Code = Code;  
            return Adapter.SelectByField(obj,"Code");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Code duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCode (string Code, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.Code = Code;  
            return Adapter.SelectByField(obj,"Code",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Code 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByCodeLST (string Code )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.Code = Code;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Code"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Code duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByCodeLST (string Code, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.Code = Code;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Code",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (PT_OILEntity obj)
        { 
            return Adapter.SelectByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (PT_OILEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CreatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByCreatedByLST (PT_OILEntity obj)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByCreatedByLST (PT_OILEntity obj,SelectOptions option)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CreatedBy",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (string CreatedBy )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.CreatedBy = CreatedBy;  
            return Adapter.SelectByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (string CreatedBy, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.CreatedBy = CreatedBy;  
            return Adapter.SelectByField(obj,"CreatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByCreatedByLST (string CreatedBy )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.CreatedBy = CreatedBy;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByCreatedByLST (string CreatedBy, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.CreatedBy = CreatedBy;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (PT_OILEntity obj)
        { 
            return Adapter.SelectByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (PT_OILEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CreatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByCreatedDateLST (PT_OILEntity obj)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByCreatedDateLST (PT_OILEntity obj,SelectOptions option)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CreatedDate",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (DateTime CreatedDate )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.CreatedDate = CreatedDate;  
            return Adapter.SelectByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (DateTime CreatedDate, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.CreatedDate = CreatedDate;  
            return Adapter.SelectByField(obj,"CreatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByCreatedDateLST (DateTime CreatedDate )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.CreatedDate = CreatedDate;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByCreatedDateLST (DateTime CreatedDate, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.CreatedDate = CreatedDate;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ID duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByID (PT_OILEntity obj)
        { 
            return Adapter.SelectByField(obj,"ID");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ID duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByID (PT_OILEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"ID",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ID duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByIDLST (PT_OILEntity obj)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ID"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ID duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByIDLST (PT_OILEntity obj,SelectOptions option)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"ID",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ID 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByID (int ID )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.ID = ID;  
            return Adapter.SelectByField(obj,"ID");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ID duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByID (int ID, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.ID = ID;  
            return Adapter.SelectByField(obj,"ID",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ID 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByIDLST (int ID )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.ID = ID;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ID"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ID duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByIDLST (int ID, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.ID = ID;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ID",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsActive (PT_OILEntity obj)
        { 
            return Adapter.SelectByField(obj,"IsActive");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsActive (PT_OILEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"IsActive",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByIsActiveLST (PT_OILEntity obj)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsActive"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByIsActiveLST (PT_OILEntity obj,SelectOptions option)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"IsActive",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsActive (bool IsActive )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.IsActive = IsActive;  
            return Adapter.SelectByField(obj,"IsActive");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsActive (bool IsActive, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.IsActive = IsActive;  
            return Adapter.SelectByField(obj,"IsActive",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByIsActiveLST (bool IsActive )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.IsActive = IsActive;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsActive"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsActive duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByIsActiveLST (bool IsActive, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.IsActive = IsActive;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsActive",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsDeleted (PT_OILEntity obj)
        { 
            return Adapter.SelectByField(obj,"IsDeleted");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsDeleted (PT_OILEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"IsDeleted",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByIsDeletedLST (PT_OILEntity obj)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsDeleted"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByIsDeletedLST (PT_OILEntity obj,SelectOptions option)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"IsDeleted",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsDeleted (bool IsDeleted )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.IsDeleted = IsDeleted;  
            return Adapter.SelectByField(obj,"IsDeleted");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsDeleted (bool IsDeleted, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.IsDeleted = IsDeleted;  
            return Adapter.SelectByField(obj,"IsDeleted",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByIsDeletedLST (bool IsDeleted )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.IsDeleted = IsDeleted;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsDeleted"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByIsDeletedLST (bool IsDeleted, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.IsDeleted = IsDeleted;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsDeleted",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (PT_OILEntity obj)
        { 
            return Adapter.SelectByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (PT_OILEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UpdatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByUpdatedByLST (PT_OILEntity obj)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByUpdatedByLST (PT_OILEntity obj,SelectOptions option)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UpdatedBy",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (string UpdatedBy )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.UpdatedBy = UpdatedBy;  
            return Adapter.SelectByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (string UpdatedBy, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.UpdatedBy = UpdatedBy;  
            return Adapter.SelectByField(obj,"UpdatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByUpdatedByLST (string UpdatedBy )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.UpdatedBy = UpdatedBy;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByUpdatedByLST (string UpdatedBy, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.UpdatedBy = UpdatedBy;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (PT_OILEntity obj)
        { 
            return Adapter.SelectByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (PT_OILEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UpdatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByUpdatedDateLST (PT_OILEntity obj)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectByUpdatedDateLST (PT_OILEntity obj,SelectOptions option)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UpdatedDate",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (DateTime UpdatedDate )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.UpdatedDate = UpdatedDate;  
            return Adapter.SelectByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (DateTime UpdatedDate, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.UpdatedDate = UpdatedDate;  
            return Adapter.SelectByField(obj,"UpdatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByUpdatedDateLST (DateTime UpdatedDate )
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.UpdatedDate = UpdatedDate;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate"),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_OILEntity> SelectByUpdatedDateLST (DateTime UpdatedDate, SelectOptions option)
        { 
            PT_OILEntity obj = new PT_OILEntity();
            obj.UpdatedDate = UpdatedDate;  
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate",option),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectWithConditionLST (PT_OILEntity obj)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new PT_OILEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<PT_OILEntity></returns>
        public List<PT_OILEntity> SelectWithConditionLST (PT_OILEntity obj,SelectOptions option)
        { 
            return  (List<PT_OILEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new PT_OILEntity());
        }

}
}
